home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_01 / getch.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  23KB  |  782 lines

  1. /*
  2.  * This software is Copyright (c) 1989, 1990, 1991 by Patrick J. Wolfe.
  3.  *
  4.  * Permission is hereby granted to copy, distribute or otherwise
  5.  * use any part of this package as long as you do not try to make
  6.  * money from it or pretend that you wrote it.  This copyright
  7.  * notice must be maintained in any copy made.
  8.  *
  9.  * Use of this software constitutes acceptance for use in an AS IS
  10.  * condition. There are NO warranties with regard to this software.
  11.  * In no event shall the author be liable for any damages whatsoever
  12.  * arising out of or in connection with the use or performance of this
  13.  * software.  Any use of this software is at the user's own risk.
  14.  *
  15.  * If you make modifications to this software that you feel
  16.  * increases it usefulness for the rest of the community, please
  17.  * email the changes, enhancements, bug fixes as well as any and
  18.  * all ideas to me. This software is going to be maintained and
  19.  * enhanced as deemed necessary by the community.
  20.  *
  21.  *              Patrick J. Wolfe
  22.  *              uunet!uiucuxc!kailand!pwolfe
  23.  *              pwolfe@kailand.kai.com
  24.  *
  25.  * Additions of DOS keys and extended function key descriptions
  26.  * made by Mark Hessling.
  27.  *
  28.  */
  29.  
  30. /* System V curses key names and codes returned by getch */
  31.  
  32. /*
  33. $Header: C:\THE\RCS\getch.h 1.4 1993/09/01 16:26:31 MH Interim MH $
  34. */
  35.  
  36.  
  37. #ifndef KEY_MIN
  38. #define KEY_MIN         0x101           /* Minimum curses key */
  39. #endif
  40. #ifndef KEY_BREAK
  41. #define KEY_BREAK    0x101    /* Not on PC KBD         */
  42. #endif
  43. #ifndef KEY_DOWN
  44. #define KEY_DOWN    0x102    /* Down arrow key         */
  45. #endif
  46. #ifndef KEY_UP
  47. #define KEY_UP        0x103    /* Up arrow key             */
  48. #endif
  49. #ifndef KEY_LEFT
  50. #define KEY_LEFT    0x104    /* Left arrow key         */
  51. #endif
  52. #ifndef KEY_RIGHT
  53. #define KEY_RIGHT    0x105    /* Right arrow key         */
  54. #endif
  55. #ifndef KEY_HOME
  56. #define KEY_HOME    0x106    /* home key             */
  57. #endif
  58. #ifndef KEY_BACKSPACE
  59. #define KEY_BACKSPACE    0x107    /* not on pc             */
  60. #endif
  61. #ifndef KEY_F0
  62. #define KEY_F0        0x108    /* function keys. space for     */
  63. #define KEY_F(n)    (KEY_F0+(n))/* 64 keys are reserved.     */
  64. #endif
  65. #ifndef KEY_DL
  66. #define KEY_DL        0x148    /* not on pc             */
  67. #endif
  68. #ifndef KEY_IL
  69. #define KEY_IL        0x149    /* insert line             */
  70. #endif
  71. #ifndef KEY_DC
  72. #define KEY_DC        0x14a    /* delete character         */
  73. #endif
  74. #ifndef KEY_IC
  75. #define KEY_IC        0x14b    /* insert char or enter ins mode */
  76. #endif
  77. #ifndef KEY_EIC
  78. #define KEY_EIC        0x14c    /* exit insert char mode     */
  79. #endif
  80. #ifndef KEY_CLEAR
  81. #define KEY_CLEAR    0x14d    /* clear screen             */
  82. #endif
  83. #ifndef KEY_EOS
  84. #define KEY_EOS        0x14e    /* clear to end of screen     */
  85. #endif
  86. #ifndef KEY_EOL
  87. #define KEY_EOL        0x14f    /* clear to end of line         */
  88. #endif
  89. #ifndef KEY_SF
  90. #define KEY_SF        0x150    /* scroll 1 line forward     */
  91. #endif
  92. #ifndef KEY_SR
  93. #define KEY_SR        0x151    /* scroll 1 line back (reverse)     */
  94. #endif
  95. #ifndef KEY_NPAGE
  96. #define KEY_NPAGE    0x152    /* next page             */
  97. #endif
  98. #ifndef KEY_PPAGE
  99. #define KEY_PPAGE    0x153    /* previous page         */
  100. #endif
  101. #ifndef KEY_STAB
  102. #define KEY_STAB    0x154    /* set tab             */
  103. #endif
  104. #ifndef KEY_CTAB
  105. #define KEY_CTAB    0x155    /* clear tab             */
  106. #endif
  107. #ifndef KEY_CATAB
  108. #define KEY_CATAB    0x156    /* clear all tabs         */
  109. #endif
  110. #ifndef KEY_ENTER
  111. #define KEY_ENTER    0x157    /* enter or send (unreliable)     */
  112. #endif
  113. #ifndef KEY_SRESET
  114. #define KEY_SRESET    0x158    /* soft/reset (partial/unreliable)*/
  115. #endif
  116. #ifndef KEY_RESET
  117. #define KEY_RESET    0x159    /* reset/hard reset (unreliable) */
  118. #endif
  119. #ifndef KEY_PRINT
  120. #define KEY_PRINT    0x15a    /* print/copy             */
  121. #endif
  122. #ifndef KEY_LL
  123. #define KEY_LL        0x15b    /* home down/bottom (lower left) */
  124. #endif
  125. #ifndef KEY_ABORT
  126. #define KEY_ABORT    0x15c    /* abort/terminate key (any)     */
  127. #endif
  128. #ifndef KEY_SHELP
  129. #define KEY_SHELP    0x15d    /* short help             */
  130. #endif
  131. #ifndef KEY_LHELP
  132. #define KEY_LHELP    0x15e    /* long help             */
  133. #endif
  134. #ifndef KEY_BTAB 
  135. #define KEY_BTAB        0x15f            /* Back tab key */
  136. #endif
  137. #ifndef KEY_BEG  
  138. #define KEY_BEG         0x160            /* beg(inning) key */
  139. #endif
  140. #ifndef KEY_CANCEL
  141. #define KEY_CANCEL      0x161             /* cancel key */
  142. #endif
  143. #ifndef KEY_CLOSE 
  144. #define KEY_CLOSE       0x162             /* close key */
  145. #endif
  146. #ifndef KEY_COMMAND
  147. #define KEY_COMMAND     0x163             /* cmd (command) key */
  148. #endif
  149. #ifndef KEY_COPY   
  150. #define KEY_COPY        0x164             /* copy key */
  151. #endif
  152. #ifndef KEY_CREATE 
  153. #define KEY_CREATE      0x165             /* create key */
  154. #endif
  155. #ifndef KEY_END    
  156. #define KEY_END         0x166             /* end key */
  157. #endif
  158. #ifndef KEY_EXIT   
  159. #define KEY_EXIT        0x167             /* exit key */
  160. #endif
  161. #ifndef KEY_FIND   
  162. #define KEY_FIND        0x168             /* find key */
  163. #endif
  164. #ifndef KEY_HELP   
  165. #define KEY_HELP        0x169             /* help key */
  166. #endif
  167. #ifndef KEY_MARK   
  168. #define KEY_MARK        0x16a             /* mark key */
  169. #endif
  170. #ifndef KEY_MESSAGE
  171. #define KEY_MESSAGE     0x16b             /* message key */
  172. #endif
  173. #ifndef KEY_MOVE   
  174. #define KEY_MOVE        0x16c             /* move key */
  175. #endif
  176. #ifndef KEY_NEXT   
  177. #define KEY_NEXT        0x16d             /* next object key */
  178. #endif
  179. #ifndef KEY_OPEN   
  180. #define KEY_OPEN        0x16e             /* open key */
  181. #endif
  182. #ifndef KEY_OPTIONS
  183. #define KEY_OPTIONS     0x16f             /* options key */
  184. #endif
  185. #ifndef KEY_PREVIOUS
  186. #define KEY_PREVIOUS    0x170             /* previous object key */
  187. #endif
  188. #ifndef KEY_REDO    
  189. #define KEY_REDO        0x171             /* redo key */
  190. #endif
  191. #ifndef KEY_REFERENCE
  192. #define KEY_REFERENCE   0x172             /* ref(erence) key */
  193. #endif
  194. #ifndef KEY_REFRESH  
  195. #define KEY_REFRESH     0x173             /* refresh key */
  196. #endif
  197. #ifndef KEY_REPLACE  
  198. #define KEY_REPLACE     0x174             /* replace key */
  199. #endif
  200. #ifndef KEY_RESTART  
  201. #define KEY_RESTART     0x175             /* restart key */
  202. #endif
  203. #ifndef KEY_RESUME   
  204. #define KEY_RESUME      0x176             /* resume key */
  205. #endif
  206. #ifndef KEY_SAVE     
  207. #define KEY_SAVE        0x177             /* save key */
  208. #endif
  209. #ifndef KEY_SBEG     
  210. #define KEY_SBEG        0x178             /* shifted beginning key */
  211. #endif
  212. #ifndef KEY_SCANCEL  
  213. #define KEY_SCANCEL     0x179             /* shifted cancel key */
  214. #endif
  215. #ifndef KEY_SCOMMAND 
  216. #define KEY_SCOMMAND    0x17a             /* shifted command key */
  217. #endif
  218. #ifndef KEY_SCOPY    
  219. #define KEY_SCOPY       0x17b             /* shifted copy key */
  220. #endif
  221. #ifndef KEY_SCREATE  
  222. #define KEY_SCREATE     0x17c             /* shifted create key */
  223. #endif
  224. #ifndef KEY_SDC      
  225. #define KEY_SDC         0x17d             /* shifted delete char key */
  226. #endif
  227. #ifndef KEY_SDL      
  228. #define KEY_SDL         0x17e             /* shifted delete line key */
  229. #endif
  230. #ifndef KEY_SELECT   
  231. #define KEY_SELECT      0x17f             /* select key */
  232. #endif
  233. #ifndef KEY_SEND     
  234. #define KEY_SEND        0x180             /* shifted end key */
  235. #endif
  236. #ifndef KEY_SEOL     
  237. #define KEY_SEOL        0x181             /* shifted clear line key */
  238. #endif
  239. #ifndef KEY_SEXIT    
  240. #define KEY_SEXIT       0x182             /* shifted exit key */
  241. #endif
  242. #ifndef KEY_SFIND    
  243. #define KEY_SFIND       0x183             /* shifted find key */
  244. #endif
  245. #ifndef KEY_SHOME    
  246. #define KEY_SHOME       0x184             /* shifted home key */
  247. #endif
  248. #ifndef KEY_SIC      
  249. #define KEY_SIC         0x185             /* shifted input key */
  250. #endif
  251. #ifndef KEY_SLEFT    
  252. #define KEY_SLEFT       0x187             /* shifted left arrow key */
  253. #endif
  254. #ifndef KEY_SMESSAGE 
  255. #define KEY_SMESSAGE    0x188             /* shifted message key */
  256. #endif
  257. #ifndef KEY_SMOVE    
  258. #define KEY_SMOVE       0x189             /* shifted move key */
  259. #endif
  260. #ifndef KEY_SNEXT    
  261. #define KEY_SNEXT       0x18a             /* shifted next key */
  262. #endif
  263. #ifndef KEY_SOPTIONS 
  264. #define KEY_SOPTIONS    0x18b             /* shifted options key */
  265. #endif
  266. #ifndef KEY_SPREVIOUS
  267. #define KEY_SPREVIOUS   0x18c             /* shifted prev key */
  268. #endif
  269. #ifndef KEY_SPRINT   
  270. #define KEY_SPRINT      0x18d             /* shifted print key */
  271. #endif
  272. #ifndef KEY_SREDO    
  273. #define KEY_SREDO       0x18e             /* shifted redo key */
  274. #endif
  275. #ifndef KEY_SREPLACE 
  276. #define KEY_SREPLACE    0x18f             /* shifted replace key */
  277. #endif
  278. #ifndef KEY_SRIGHT   
  279. #define KEY_SRIGHT      0x190             /* shifted right